import React from 'react'
import { useNavigate } from 'react-router-dom'

function ListItem({v}) {
    const navigate=useNavigate();
  return (
    <div>
        <dl  style={{display:"flex", padding:"10px", justifyContent:"space-around"}} onClick={()=>navigate('/detail')}>
            <dt>{v.start}-{v.end}</dt>
            <dd>
                <div>{v.isSpeed ? '高铁' : '动车'}</div>
                <div>{v.isSeat ? '有座' : '无座'}</div>
            </dd>
            <dd>
                <div>商务座：{v.tick.vip}</div>
                <div>一等座：{v.tick.firstTick}</div>
                <div>二等座：{v.tick.secondTick}</div>
            </dd>
        </dl>
    </div>
  )
}

export default ListItem
